﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class mrzj : System.Web.UI.Page
{
    Datacommand datacom = new Datacommand();
    seleData seledata1 = new seleData();
    protected void Page_Load(object sender, EventArgs e)
    {//GridView1
        datacom.bindinfostring(GridView1, "select id,gznr+'  经办人：'+lururen as gznr,shijian from meirigongzuo where shijian>getdate()-10 order by id desc", "ID");

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        datacom.eccom("insert into meirigongzuo (gznr,lururen,shijian) values ('" + TextBox1.Text + "','" + Session["name"].ToString() + "',getdate())");
        Label2.Text = "添加成功";
        datacom.bindinfostring(GridView1, "select id,gznr+'  经办人：'+lururen as gznr,shijian from meirigongzuo where shijian>getdate()-10 order by id desc", "ID");

    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        TextBox1.Text = TextBox1.Text+seledata1.chalxjl(Session["name"].ToString());
    }
}